package wufei_database;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class TestMy
{
  public static void main(String[] args)
  {
    try
    {
      Connection conn;
      Statement stmt;
      ResultSet res;

      Class.forName("com.mysql.jdbc.Driver").newInstance();

      conn = DriverManager.getConnection("jdbc:mysql://pardosa06.cs.washington.edu/test",
                                         "clzhang", "wiki");

      stmt = conn.createStatement();
      res = stmt.executeQuery("select * from produce");

      while (res.next())
      {
        String name = res.getString("name");
        System.out.println(name);
      }
      res.close();

    }
    catch (Exception ex)
    {
      System.out.println("Error : " + ex.toString());
    }
  }
}
